package com.myproject.myblogserver.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.time.LocalDateTime;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

/**
 * <p>
 * 用户私信表
 * </p>
 *
 * @author jiangweike
 * @since 2025-02-25
 */
@Getter
@Setter
@TableName("user_message")
@ApiModel(value = "UserMessage对象", description = "用户私信表")
public class UserMessage implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("主键ID")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty("发送者ID（关联user.id）")
    private Long senderId;

    @ApiModelProperty("接收者ID（关联user.id）")
    private Long receiverId;

    @ApiModelProperty("私信内容")
    private String content;

    @ApiModelProperty("是否已读 (0:未读, 1:已读)")
    private Boolean isRead;

    @ApiModelProperty("逻辑删除标志 (0:未删除, 1:已删除)")
    private Boolean isDeleted;

    @ApiModelProperty("发送时间")
    private LocalDateTime createdAt;
}
